/**
 * digiModularInstaller
 * 
 * installer module for DirectX
 * 
 */
 
 function directx(target) {
 	this.installedVersion = getDxVersion();
 	this.providedVersion = "4.09.00.0904";
 	this.fullName = "DirectX";
 	//this.osRequirement = new Array( ["Windows XP"],["Windows 2000"]);
 	this.install = new Array( 
 		["\\\\ca-fs1\\Installs\\Domain Admins\\Utilities\\Windows 2000 Updates\\(3) DirectX 9.0c Installation.exe /Q"] 
 		);
 	this.uninstall = "";
 	this.installPriority = 200;
 	
 	function getDxVersion() {
 		eval( includeExtJS("lib\\wmiRegistryTools.js") ); // load up our tools
 		var dxVersion = registryToolsReadValue(target, "HKLM", "Software\\Microsoft\\DirectX", "Version", "REG_SZ");
 		return dxVersion;
 		/* the following switch statement returns "pretty" versions for
 		 * directx.. however, for comparison sake, we'll use the raw
 		 * version number
 		
 		var finalVer;
 		switch(dxVersion) {
 			case "4.02.0095":
 				finalVer = "1.0";
 				break;
			case "4.03.00.1096":
				finalVer = "2.0";
				break;
			case "4.04.0068":
				finalVer = "3.0";
				break;
			case "4.04.0069":
        		finalVer = "3.0";
        		break
    		case "4.05.00.0155":
        		finalVer = "5.0";
        		break;
    		case "4.05.01.1721":
    			finalVer = "5.0";
    			break;
    		case "4.05.01.1998":
        		finalVer = "5.0";
        		break;
    		case "4.06.02.0436":
        		finalVer = "6.0";
        		break;
    		case "4.07.00.0700":
        		finalVer = "7.0";
        		break;
    		case "4.07.00.0716":
        		finalVer = "7.0a";
        		break;
    		case "4.08.00.0400":
        		finalVer = "8.0";
        		break;
    		case "4.08.01.0881":
        		finalVer = "8.1";
        		break;
    		case "4.08.01.0810":
        		finalVer = "8.1";
        		break;
    		case "4.09.0000.0900":
        		finalVer = "9.0"
        		break;
    		case "4.09.00.0900":
        		finalVer = "9.0";
        		break;
    		case "4.09.0000.0901":
        		finalVer = "9.0a";
        		break;
    		case "4.09.00.0901":
    			finalVer = "9.0a";
    			break;
    		case "4.09.0000.0902":
        		finalVer = "9.0b";
        		break;
    		case "4.09.00.0902":
    			finalVer = "9.0b";
    			break;
    		case "4.09.00.0904":
        		finalVer = "9.0c";
        		break;
    		case "4.09.0000.0904":
        		finalVer = "9.0c";
        		break;
 		}
 		return finalVer;
 		*/
 	}
 }
 
 